<!DOCTYPE html>
<!-- saved from url=(0038)http://238887.m.weimob.com/vshop/index -->
<html lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml"><head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta name="viewport" content=" initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<title>{$title}</title>
	<meta charset="utf-8">
	<link href="{$Think.config.RESOURCEURL}wx_assets/css/common.css{$Think.config.RESOURCE_VER}" rel="stylesheet">
	<link href="{$Think.config.RESOURCEURL}wx_assets/css/iconfont/font_tuan.css{$Think.config.RESOURCE_VER}" rel="stylesheet">
	<link href="{$Think.config.RESOURCEURL}wx_assets/css/product/product_ychz_index.css{$Think.config.RESOURCE_VER}" rel="stylesheet">
	<!-- <script src="http://sdk.talkingdata.com/app/h5/v1?appid=DE13C350F41F5DE78FEC51DB5DE730D1&vn=v2&vc=v2"></script> -->
	<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	<script src="{$Think.config.RESOURCEURL}wx_assets/js/product/product_ychz_index.js{$Think.config.RESOURCE_VER}"></script>
	<script src="{$Think.config.RESOURCEURL}wx_assets/js/jquery-1.8.2.min.js{$Think.config.RESOURCE_VER}"></script>
	<script src="{$Think.config.RESOURCEURL}wx_assets/js/util.js{$Think.config.RESOURCE_VER}"></script>
	<script src="{$Think.config.RESOURCEURL}wx_assets/js/product/sea.js{$Think.config.RESOURCE_VER}"></script>
	<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/wx_share.js{$Think.config.RESOURCE_VER}"></script>
	<script src="{$Think.config.RESOURCEURL}wx_assets/js/product/timer.js{$Think.config.RESOURCE_VER}" type="text/javascript"></script>
	<style>
		.load-more {
			margin-left: auto;
			margin-right: auto;
			font-size: 15px;
			color: #3985FF !important;
			/*border: 1px solid #3e3e3e;*/
			display: block;
			width: 100%;
			text-align: center;
			background: #fff;
			padding:10px 0;
			/*background-color: #5d5554;*/
			/*background-image: -ms-linear-gradient(top, #5c5453 0%, #4b4443 100%);*/
			/*background-image: linear-gradient(top, #5c5453 0%, #4b4443 100%);*/
			/*background-image: -webkit-gradient(linear,0 0%,0% 100%,from(#5c5453),to(#4b4443));*/
		}
		.load-more:before{
			content: ' ';width: 8px;height: 8px;border-top: 1px solid #7d7d7d;
			border-left: 1px solid #7d7d7d;position:relative;display:inline-block;
			border-color:#3985FF;-webkit-transform: rotate(225deg);margin-right: 10px;margin-bottom: 3px;
		}
		.taggroup
		{
			position: absolute;
			top: 3px;
			left: 0px;
			padding:0px 0px;
			height: 38px;
			overflow: hidden;
		}
		.taggroup > span
		{
			display: block;
			padding: 2px 7px;
			background: #F65492;
			color: white;
			position: relative;
			margin: 0px 5px;
			margin-left: 0px;
			margin-bottom: 40px;
			float: left;
		}
		.taggroup > span img
		{
			height: 11px;
			width: 100%;
			position: absolute;
			bottom: -11px;
			display: block;
			width: 100%;
			left: 0px;
			right: 0px;
		}
		/*.taggroup > span:after
		{
			content: '';
			background: url({$Think.config.RESOURCEURL}wx_assets/indiana/images/tag.png) no-repeat;
			background-size: contain;
			width: 100%;
		    height: 18px;
		    
		    position: absolute;
		    bottom: -18px;
		    left: 0px;
		}*/
		.taggroup > span p
		{
			position: relative;
			top:5px;
			color: white !important;
			line-height: auto !important;
			height: auto !important;
			padding: 0px !important;
			display: inline !important;
		}
		.teamInfo1{
			margin: 6px 0;
		}
		.teamInfo1{
			display: block;
			border-radius: 50px;
			height: 33px;
			background-color: #F65492;
			color: white;
			font-size: 14px;

		}
		.teamInfo1 i
		{
			font-size: 12px;
			font-style: normal;
		}
		.teamInfo1 i.ico_team{
			width: 37px;
			height: 37px;
			border-radius: 50%;
			border: 1px solid #F65492;
			overflow: hidden;
			display:block;
			background-image: url(../../images/product/iteam.png);
			background-position: center center;
			background-size: 28px auto;
			background-repeat: no-repeat;
			background-color: white;
			position: relative;
			top: -3px;
			float: left;
		}
		.teamInfo1 .iteamNum{
			text-align: center;
			float: left;
			padding: 0 10px;
			padding-right: 0px;
			height: 15px;
			margin: 9px 0;
			line-height: 15px;
			font-size: 22px;
		}
		.teamInfo1 .iteamNum i
		{
			font-size: 14px;
		}
		.teamInfo1 .iteamPrice{
			line-height: 33px;
			float: left;
			font-size: 12px;
			text-decoration: line-through;
			padding: 0px 6px;
		}
		.teamInfo1 .iteamPrice span{
			font-size: 18px;
		}
		.teamInfo1 .iteamPrice:after {
			content: "";
			clear: both;
		}
		.teamInfo1 .toDetail{
			line-height: 33px;
			padding-right: 25px;
			float: right;
			position:relative;
			font-size: 14px;
		}
		.teamInfo1 .toDetail:after{
			content: "";
			display: block;
			width: 7px;
			height: 7px;
			border-right: 1px solid white;
			border-top: 1px solid white;
			-webkit-transform: rotate(45deg);
			position: absolute;
			right: 10px;
			top: 13px;
		}
		.teamInfo1  i.ico_team p
		{
			font-size: 12px;
			color: #F65492;
			margin-top: 2px;
			text-align: center;
			line-height: 15px;
			height: auto;
			padding: 0px;

		}
		.seckillTime
		{
			position: absolute;
			top: 5px;
			height: 30px;
			background: rgba(0,0,0,0.7);
			width: 120px;
			color: white;
			border-top-right-radius: 17px;
			border-bottom-right-radius:17px;
			font-size: 12px;
		}
		.seckillTime span
		{
			font-size: 12px;
			text-indent: 2px;
			text-align: left;
			line-height: 30px;
		}
		.seckillTime i.timeicon
		{
			display: inline-block;
			width: 23px;
			height: 23px;
			background: url({$Think.config.RESOURCEURL}wx_assets/indiana/images/iconfont-time.png) no-repeat;
			background-size:contain;
			vertical-align: middle;
			position: relative;
			top: -1px;
		}
		.seckillTime i.lxftime
		{
			font-weight: normal;
			font-size: 12px !important;
			font-style: normal;
			margin-left: 0px;
		}
		.seckillTime i.lxftime b
		{
			font-size: 12px;
			font-weight: normal;
		}
	</style>
</head>
<body onselectstart="return true;" ondragstart="return false;">
<!--关注浮层 begin-->
<!--0表示未关注，1表示已关注-->
<if condition="$selfInfo.subscribe eq '0'">
	<style>
		.careview
		{
			position: fixed;
			top: 0px;
			left: 0px;
			right: 0px;
			padding: 8px 110px 8px 65px;
			background: rgba(0,0,0,0.5);
			z-index: 999;
			color: white;
			height: 61px;
			box-sizing: border-box;
		}
		.careview > span
		{
			content: '';
			display: block;
			position: absolute;
			top: 50%;
			right: 5px;
			background: url({$Think.config.RESOURCEURL}wx_assets/images/careclose.png) no-repeat;
			width:18px;
			height: 18px;
			margin-top: -9px;
			background-size: contain;
			opacity: 0.8;
		}
		.careview > img
		{
			display: block;

			width: 45px;
			height: 45px;
			border-radius: 4px;
			position: absolute;
			top: 50%;
			left: 10px;
			margin-top: -22px;
		}
		.careview > a
		{
			background: #1c93ce;
			display: block;
			color: white;
			text-align: center;
			border-radius: 4px;
			width: 75px;
			height: 35px;
			line-height: 35px;
			font-size: 14px;
			top: 50%;
			margin-top: -17px;
			right:35px;
			position: absolute;

		}
		.careview > p
		{
			display: inline-block;
			vertical-align: middle;
			font-size: 14px;
			padding: 3px 0px;
			max-height: 38px;
			overflow: hidden;
			height: 100%;
			line-height: 38px;
		}
	</style>
	<div class="careview">
		<img src="{$mallInfo.logo}" alt="" />
		<a href='{$mallInfo.wechaturl}'>立即关注</a>
		<empty name="mallInfo.recommend">
			<p>{$mallInfo.wechatname}</p>
			<else />
			<p>{$mallInfo.recommend}</p>
		</empty>

		<span></span>
	</div>
	<script>
		$('.careview > span').on('click',function(){
			$('.careview').hide();
		});
	</script>
</if>
<!--关注浮层 end-->
<div id="shop-container">
	<volist name="item" id="pitem" key = "k">
		<div data-role="container" class="container home">
			<header data-role="header">
			</header>
			<section data-role="body" class="body">
				<if condition="$pitem.moduleType eq 'play'">
					<div data-role="widget" data-widget="slider_5_35928_{$k}" class="slider_5">
						<section class="widget_wrap">
							<div id="slider_5_wrap_35928_{$k}" class="slider_5_wrap" style="overflow:hidden;">
								<ul style="list-style: none; width: 1600px;-webkit-transition: -webkit-transform 0ms; transition: -webkit-transform 0ms; -webkit-transform: translate3d(-1053px, 0px, 0px);">
									<volist name="pitem.aboutitem" id="page">
										<if condition="$page neq ''">
											<li style="width: 320px; display: table-cell; vertical-align: top;">
												<a href="{$page.piclink}">
													<img style="min-width:320px" src="{$page.picurl}" >
												</a>
											</li>
										</if>
									</volist>

								</ul>
								<div id="slider_5_indicate_35928_{$k}" class="slider_5_indicate"></div>
							</div>
						</section> </div>
					<script type="text/javascript">
						var slider_5 = (function () {
							var that = {};
							that. initSlider = function () {
								that.slider = new Swipe(document.getElementById('slider_5_wrap_35928_{$k}'), {
									speed: 500,
									loop: true,
									auto: 3000,
									indicate: "#slider_5_indicate_35928_{$k}"
								});
								return that;
							};
							return that;
						})().initSlider();
					</script>
				</if>


				<if condition="$pitem.moduleType eq 'category'">
					<div data-role="widget" data-widgt="fn_1" class="fn_1">
						<div class="widget_wrap" style="display: inline-block;width:100%">
							<ul class="box">
								<volist name="pitem.aboutitem" id="page">
									<if condition="$page neq ''">
										<li style="width:25%;">
											<a href="{$page.cateurl}">
												<img style="width:50px;height:50px;border-radius:32px;" src="{$page.catepic}" alt="{$page.catetitle}">
												<label>{$page.catetitle}</label>
											</a>
										</li>
									</if>
								</volist>
							</ul>
						</div>
					</div>
				</if>
				<if condition="$pitem.moduleType eq 'center'">
					<div data-role="widget" data-widget="pic_1" class="pic_1">
						<div class="widget_wrap">
							<ul>
								<li>
									<notempty name="pitem.aboutitem.centerlink">
										<a class="img_wrap" href="{$pitem.aboutitem.centerlink}">
											<img src="{$pitem.aboutitem.centerpic}">
										</a>
									</notempty>
									<empty name="pitem.aboutitem.centerlink">
										<a class="img_wrap">
											<img src="{$pitem.aboutitem.centerpic}">
										</a>
									</empty>
								</li>

							</ul>
						</div>
					</div>
				</if>
				<div data-role="widget" data-widget="goodsList_1" class="goodsList_1">
					<if condition="$pitem.moduleType eq 'one' or $pitem.moduleType eq 'two'">
						<div class="widget_wrap"   style="overflow: hidden;">
							<!--<h4>{$pitem.title}</h4>-->
							<ul class="{$pitem.moduleType}" id ="show_container{$count}">
								<volist name="pitem.productList" id="product">
									<li>
										<a onclick="onDetail('{$product.fromCustomerId}','{$product.id}','{$product.sId}')" herf="javascript:;">
											<div class="imgdiv" align="center" name="imgdiv"  style="position: relative;">
												<if condition="$product['playType'] eq 4">
													<div class="seckillTime" style="text-align: center;">
													<span style="text-align: center;"><!--<i class="timeicon"></i>-->
														<if condition="$product['seckillIsEnd'] neq '1'">
															<if condition="$product['seckillIsStart'] eq '1'">
																<i class="lxftime" nowtime="{$product.nowTime}" endtime="{$product.seckillEndtime}" col="0" lxfday="no" lxftext="距结束"></i>
																<else />
																<!--{$product.seckillStartTime}-->
																<!--<php>echo date("H:i:s",strtotime($product["seckillStartTime"]));</php>-->
																<i class="lxftime" nowtime="{$product.nowTime}" endtime="{$product.seckillStartTime}" col="0" lxfday="no" lxftext="距开始"></i>
															</if>
															<else />
															已抢完
														</if>
													</span>
													</div>

													<else />
													<div class="taggroup">
														<volist name="product.picTag" id="pct">
												<span>
													<p>{$pct}</p>
													<i><img src="{$Think.config.RESOURCEURL}wx_assets/indiana/images/tag.png" alt="" /></i>
												</span>
														</volist>
													</div>
												</if>
												<img src="{$product.picUrl}@1sh.jpg" onload="$.util.imgCenter(this)">
											</div>
											<div class="infodiv-container">
												<div class="infodiv">
													<if condition="$pitem.moduleType eq 'one'">
														<if condition="$product['playType'] eq '3'">
															<p class="title" style=" line-height: 22px;min-height: 30px;max-height: 45px;height:auto">
																<if condition="$product.playType eq '3'">
																	<span class="indianaState">夺宝</span>&nbsp;
																</if>
																{$product.title}
															</p>
															<notempty name="product.description">
																<p class="title" style="line-height: 22px;max-height: 45px;color:red;font-size:14px;height:auto">{$product.description}</p>
															</notempty>
															<div class="indianaInfo">
																<div class="bar">
																	<span style="width:{$product.barProgress}"></span>
																</div>
																<div class="partakeCount">
																	<span>总需{$product.totalCopies}人次</span>
																	<span>剩余<label style="color:#009ddf;float:right;padding:0">{$product.beenSold}</label></span>
																</div>
															</div>
															<div class="btn_panic_div">
																<span class="btn_panic">立即抢购</span>
															</div>
															<else/>
															<p class="title" style=" line-height: 22px;max-height: 45px;height:auto">
																<if condition="$product['teambuy'] eq '1'">
																	<label class="tag">组团购</label>
																</if>
																{$product.title}
															</p>
															<notempty name="product.description">
																<p class="title" style="line-height: 22px;max-height: 45px;color:red;font-size:14px;height:auto">{$product.description}</p>
															</notempty>
															<if condition="$product['teambuy'] eq '1'">
																<div class="teamInfo1">
																	<i class="ico_team">
																		<p>{$product.teamCount}<br />人团</p>
																	</i>
																	<div class="iteamNum"><i>&yen;</i>{$product.teamPrice}
																		<del style="font-size:12px;color:#fff"><i>&yen;</i>{$product.fixedPrice}</del></div>
																	<div class="toDetail">去组团</div>

																</div>
																<elseif condition="$product['freeBuy'] eq '1'"/>
																<label class="price" style="margin-top:10px">￥{$product['freeBuyMoney'][0]}~￥<php>echo end($product['freeBuyMoney'])</php></label>
																<elseif condition="$product['playType'] eq '5' AND $isEnjoyMiPrice eq '1'"/>
																<if condition="$product.supportSpecification eq '1' and $product['minMiPrice'] neq $product['maxMiPrice']">
																	<label class="price" style="margin-top:10px">
																		密友价:￥{$product.minMiPrice|floatval}~{$product.maxMiPrice|floatval}
																	</label>
																	<elseif condition="$product.supportSpecification eq '1'"/>
																	<label class="price" style="margin-top:10px">
																		密友价:￥{$product.minMiPrice|floatval}
																	</label>
																	<else/>
																	<label class="price" style="margin-top:10px">密友价:￥{$product.miPrice|floatval}
																		<del>￥{$product.fixedPrice|floatval}</del>
																	</label>
																</if>
																<elseif condition="$product.supportSpecification eq '1'"/>
																<if condition="$product.minDisPrice gt 0 and $product['minDisPrice'] neq $product['maxDisPrice']">
																	<label class="price" style="margin-top:10px"><i>&yen;</i>{$product.minDisPrice|floatval}~{$product.maxDisPrice|floatval}</label>
																	<elseif condition="$list.minDisPrice gt 0"/>
																	<label class="price" style="margin-top:10px"><i>&yen;</i>{$product.minDisPrice|floatval}</label>
																	<elseif condition="$list['minFixedPrice'] neq $list['maxFixedPrice']"/>
																	<label class="price" style="margin-top:10px"><i>&yen;</i>{$product.minFixedPrice|floatval}~{$product.maxFixedPrice|floatval}</label>
																	<else/>
																	<label class="price" style="margin-top:10px"><i>&yen;</i>{$product.minFixedPrice|floatval}</label>
																</if>
																<else/>
																<notempty name="product.discountedPrice">
																	<label class="price" style="margin-top:10px">￥{$product.discountedPrice}</label>
																	<elseif condition="($product.points neq NULL)" />
																	<label class="price" style="margin-top:10px">{$product.points}积分</label>
																	<else/>
																	<label class="price" style="margin-top:10px">￥{$product.fixedPrice}</label>
																</notempty>
															</if>
														</if>
														<else/>
														<p class="title">{$product.name}</p>
														<if condition="$product['freeBuy'] eq '1'">
															<label class="price" style="margin-top:10px">￥{$product['freeBuyMoney'][0]}~￥<php>echo end($product['freeBuyMoney'])</php></label>
															<elseif condition="$product['playType'] eq '3'"/>
															<div style="padding:0 5px">
																<div class="indianaInfo" style="width:55%;margin:0">
																	<div class="bar">
																		<span style="width:{$product.barProgress}"></span>
																	</div>
                                                                      <span style="font-size:12px;color: #4a4a4a;display:block;margin-top:3px">开奖进度
                                                                        <span style="color:#009ddf;font-size:12px">{$product.barProgress}</span>
                                                                    </span>
																</div>
																<div class="btn_panic_div" style="margin-top:0;">
																	<span class="btn_panic" style="padding:3px;font-size:12px;position:relative;top:5px;margin-right:0">立即抢购</span>
																</div>
															</div>
															<elseif condition="$product['teambuy'] eq '1'"/>
															<label class="price">￥{$product.teamPrice}</label>
															<elseif condition="$product['playType'] eq '5' AND $isEnjoyMiPrice eq '1'"/>
															<if condition="$product.supportSpecification eq '1' and $product['minMiPrice'] neq $product['maxMiPrice']">
																<label class="price">
																	密友价:￥{$product.minMiPrice|floatval}~{$product.maxMiPrice|floatval}
																</label>
																<elseif condition="$product.supportSpecification eq '1'"/>
																<label class="price">
																	密友价:￥{$product.minMiPrice|floatval}
																</label>
																<else/>
																<label class="price">密友价:￥{$product.miPrice|floatval}
																	<del>￥{$product.fixedPrice|floatval}</del>
																</label>
															</if>
															<elseif condition="$product.supportSpecification eq '1'"/>
															<if condition="$product.minDisPrice gt 0 and $product['minDisPrice'] neq $product['maxDisPrice']">
																<label class="price"><i>&yen;</i>{$product.minDisPrice|floatval}~{$product.maxDisPrice|floatval}</label>
																<elseif condition="$list.minDisPrice gt 0"/>
																<label class="price"><i>&yen;</i>{$product.minDisPrice|floatval}</label>
																<elseif condition="$list['minFixedPrice'] neq $list['maxFixedPrice']"/>
																<label class="price"><i>&yen;</i>{$product.minFixedPrice|floatval}~{$product.maxFixedPrice|floatval}</label>
																<else/>
																<label class="price"><i>&yen;</i>{$product.minFixedPrice|floatval}</label>
															</if>
															<else/>
															<notempty name="product.discountedPrice">
																<label class="price">￥{$product.discountedPrice}</label>
																<elseif condition="($product.points neq NULL)" />
																<label class="price">{$product.points}积分</label>
																<else/>
																<label class="price">￥{$product.fixedPrice}</label>
															</notempty>
														</if>
													</if>
												</div>
											</div>
										</a>
									</li>
								</volist>
							</ul>
						</div>

					</if>
				</div>
			</section>
			<footer data-role="footer">
				<if condition="$pitem.moduleType eq 'bottomlink'">
					<div data-role="copyright" >

						<div data-role="copyright" data-copyright="copyright1" class="copyright1">
							<div class="widget_wrap">
								<ul class="tbox">
									<volist name="pitem.aboutitem" id="page" key = "k">
										<if condition="$page neq ''">
											<li style="width:20%">
												<a href="{$page.link}" style="color:#e1037e">{$page.title}</a>
											</li>
										</if>
									</volist>
								</ul>
							</div>
						</div>
					</div>
				</if>
				<if condition="$pitem.moduleType eq 'bottomlist'">
					<div data-role="widget" data-widget="menu_4" class="menu_4" style="padding-top:50px">
						<div class="widget_wrap" style="height:auto">
							<ul id="menu_4_ul" style="z-index:9999;">
								<volist name="pitem.aboutitem" id="list" key = "k">
									<if condition="$list neq ''">
										<li>
											<a href="{$list.link}">
												<img src="{$list.picurl}" style="width:30px;height:30px;margin-top:8px"/>
												<p>{$list.title}</p>
											</a>
										</li>
									</if>
								</volist>
							</ul>
						</div>
					</div>
				</if>
			</footer>
		</div>
	</volist>
	<a id="car" class="car" onclick="goCart()">
		<i class="iconfont">&#xe608;</i>
		<span>
			<p id="carNum"></p>
		</span>
	</a>
	<div data-widget="tools" data-tools="tools_widget" id="tools_widget" class="tools_widget" style="display:none">
		<div class="widget_wrap">
			<ul class="tools_widget_wrap" style="height:43px;bottom: 106px;right: 11px;">
				<li >
					<a href="#top" id="tools_widget_goTop" class="tools_widget_goTop" style="line-height:inherit; margin-top:5px;"><img src="{$Think.config.RESOURCEURL}wx_assets/images/product/top.png" /><br/>
						<span>顶部</span></a>
				</li>
			</ul></div></div>
	<script type="text/html" id="productTpl">
		<%if(productList){
		for(var i=0;i<productList.length;i++){
		var product=productList[i];%>
		<li>
			<a onclick="onDetail('<%=product.fromCustomerId%>','<%=product.id%>','<%=product.sId%>')" href="javascript:;">
				<div class="imgdiv" align="center" name="imgdiv" >
					<img src="<%=product.picUrl%>@350h_100Q" onload="$.util.imgCenter(this)">
				</div>
				<div class="infodiv-container">
					<div class="infodiv">
						<%if(productList.moduleType== 'one'){%>
						<p class="title" style="margin-top:38px;  line-height: 22px;height: 45px;"><%=product.name%></p>
						<%if(product.freeBuy){%>
						<label class="price" style="margin-top:10px">￥<%=first(product.freeBuyMoney)%>~￥<%=last(product.freeBuyMoney)%></label>
						<%}else{%>
						<%if(product.discountedPrice){%>
						<label class="price" style="margin-top:10px">￥<%=product.discountedPrice%></label>
						<%}else if(product.points){%>
						<label class="price" style="margin-top:10px"><%=product.points%>积分</label>
						<%}else{%>
						<label class="price" style="margin-top:10px">￥<%=product.fixedPrice%></label>
						<%}%>
						<%}%>
						<%}else{%>
						<p class="title"><%=product.name%></p>
						<%if(product.freeBuy){%>
						<label class="price">￥<%=first(product.freeBuyMoney)%>~￥<%=last(product.freeBuyMoney)%></label>
						<%}else{%>
						<%if(product.discountedPrice){%>
						<label class="price">￥<%=product.discountedPrice%></label>
						<%}else if(product.points){%>
						<label class="price"><%=product.points%>积分</label>
						<%}else{%>
						<label class="price">￥<%=product.fixedPrice%></label>
						<%}%>
						<%}%>
						<%}%>
					</div>
				</div>
			</a>
		</li>
		<%}}%>
	</script>
	<script>
		var hrefParamsArray = GetSessionIdFromHref(window.location.search);
		hrefParamsArray["userName"]='{$userName}';
		var hrefPath = 'call.html?customerId='+ hrefParamsArray["customerId"]+'&userName='+hrefParamsArray["userName"];
		var basePath = 'call.json?customerId='+ hrefParamsArray["customerId"]+'&userName='+hrefParamsArray["userName"];
		var baseUrl = '{$Think.config.SERVER_HOST}';
		var p=$.util.getParamAsObject();
		var buyParams={
			"pids": "{$id}",
			"type": "buy",
			"qId":p.qId,
			"miUId":p.miUId,
			"vId":"{$vId}",
			"shareId":"{$sId}",
			"shareFromGuid":p.fromGuid,
			"userName":'{$userName}',
			"visitId":"{$visitId}"
		};
		function GetSessionIdFromHref(search){
		　   var args = search.substring(1);
　　              var retval = new Array();
			args = args.split("&");
			for(var i = 0; i < args.length; i ++){
				str = args[i];
				var arg = str.split("=");
				if(arg.length <= 1) continue;

				if(arg[0] == 'params') {
					var params = decodeURIComponent(arg[1]);
					var obj = eval('(' + params + ')');
					if (obj.rootid != undefined) {
						retval["rootid"] = obj.rootid;
					}
					if (obj.start != undefined) {
						retval["start"] = obj.start;
					}
					retval["id"] = obj.id;
				} else if(arg[0] == 'customerId') {
					retval["customerId"] = arg[1];
				}else if(arg[0] == 'userName'){
					retval["userName"] = arg[1];
				} else if(arg[0] == 'method') {
					retval["method"] = arg[1];
				} else if (arg[0] == 'module') {
					retval["module"] = arg[1];
				}
			}

			if (retval["start"] == undefined) {
				retval["start"] = 0;
			}
			return retval;
		}
		function goCart(){
			var p=$.util.getParamAsObject();
			var params=$.extend(p,{
				"sid":"-1",
				"type":"buy",
				"tplid":"4",
				"mid":4,
				"vId":buyParams.vid,
				"qId":p.qId||"{$quanInfo.qId}",
				"miUId":p.miUId||"{$quanInfo.miUId}"
			});
			params=encodeURIComponent(JSON.stringify(params));
			location.href = hrefPath+'&module=product&method=getCart&params=' + params;
		}
		function getCartGoodsNum() {
			var customerId=$.util.getParam("customerId");
			$.req.get("call.json?module=product&customerId="+customerId+"&method=getCarNum",{
				userName:"{$userName}",
				params:{
					"type":"buy",
					"sid":"-1"
				}
			},function(data){
				if (!data.code) {
					$("#carNum").text(data.total || 0).data("num", data.total);
					if (data && data.total > 0) {
						$("#car").addClass("to-car");
					} else {
						$("#car").removeClass("to-car");
					}
				}
			});
		}
		template.helper('last', function(date) {
			date=date.split(",");
			return date[date.length-1];
		});
		template.helper('first', function(date) {
			date=date.split(",");
			return date[0];
		});
		getCartGoodsNum();
		$("#global-cart").click(function(){
			var params = '{"sid":-1,"type":"buy","tplid":7,"mid":' + hrefParamsArray["id"] + '}';
			location.href = 'call.html?userName=' + hrefParamsArray['userName'] + '&customerId='
			+ hrefParamsArray['customerId'] + '&module=product&method=getCart&params=' + params;
		});
		function onDetail(fromCustomerId,id) {
			var p=$.util.getParamAsObject();
			var mallQId = "{$quanInfo.qId}";
			var mallUId = "{$quanInfo.uId}";
			if((p&& p.qId)||(mallQId&&mallUId)){
				var params={
					"id":id,
					"miUId": p.miUId||mallUId,
					"qId": p.qId||mallQId,
					"fromGuid":p.fromGuid
				}
			}else{
				var params={
					"id":id
				}
			}
			params=encodeURIComponent(JSON.stringify(params));
			location.href= 'call.html?customerId='+fromCustomerId+'&module=product&method=getProduct&params='+params;
		}
		function doMenu() {
			var params = '{"sid":-1,"type":"buy","tplid":4,"mid":' + hrefParamsArray["id"] + '}';
			location.href = 'call.html?userName=' + hrefParamsArray['userName'] + '&customerId='
			+ hrefParamsArray['customerId'] + '&module=product&method=getCart&params=' + params;
		}
		function doOrder(){
			var params = '{"type":"buy","tplid":1}';
			location.href = 'call.html?userName=' + hrefParamsArray['userName'] + '&customerId='
			+ hrefParamsArray['customerId'] + '&module=product&method=getOrder&params=' + params;
		}
		function getShareUrl(){
			var p=$.util.getParamAsObject();
			var mallQId = "{$quanInfo.qId}";
			var mallUId = "{$quanInfo.uId}";
			if(p.qId||(mallQId&&mallUId)) {
				p.qId = p.qId||mallQId;
				p.miUId = p.miUId||mallUId;
				p.fromUserName = "{$userName}";
			}else{
				var shareUrl = '{$mall.mallShareUrl}';
				if(!shareUrl){
					p.fromUserName = "{$userName}";
				}
			}
			var params=encodeURIComponent(JSON.stringify(p));
			shareUrl=baseUrl+'call.html?customerId={$customerId}&module=mall&method=getMall&params='+params;
			return shareUrl;
		}
		var shareUrl = getShareUrl();
		wx_share.init({
			"title":"{$mall.mallShareTitle}",
			"desc":"{$mall.mallShareDesc}",
			"imgUrl":"{$mall.mallShareLogo}",
			"link":shareUrl,
			"pkg":{
				"appId": '{$pkg.appId}',
				"timestamp": '{$pkg.timestamp}',
				"nonceStr": '{$pkg.nonceStr}',
				"signature": '{$pkg.signature}'
			},
			success:function(config,shareType){

			}
		});

	</script>
	<script>
		lxfEndtime();
	</script>
</body></html>
